fdt: fix address cell count checking in fdt_translate_address()
Commit: dm: core: Enable optional use of fdt_translate_address()
Enables use of this function as default, but after this it's not
possible to get dev address for the case in which: '#size-cells == 0'
This causes errors when getting address for some GPIOs, for which
the '#size-cells' is set to 0.
Example error:
'__of_translate_address: Bad cell count for gpx0'
Allowing for that case by modifying the macro 'OF_CHECK_COUNTS',
(called from )__of_translate_address(), fixes the issue.
Now, this macro doesn't check, that '#size-cells' is greater than 0.
This is possible from the specification point of view, but I'm not sure
that it doesn't introduce a regression for other configs.
Please test and share the results.
Tested-on: Odroid U3, Odroid X2, Odroid XU3, Sandbox.
Signed-off-by: Przemyslaw Marczak <[email protected]>
Cc: Masahiro Yamada <[email protected]>
Cc: Lukasz Majewski <[email protected]>
Cc: Jaehoon Chung <[email protected]>
Cc: Stefan Roese <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Bin Meng <[email protected]>
Cc: Marek Vasut <[email protected]>
Tested-by: Jaehoon Chung <[email protected]>
Tested-by: Lukasz Majewski <[email protected]>